{extend name="public/layer_base" /}
{block name='content'}

<div class="layui-fluid x-admin-sm">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <table class="layui-table layui-form">
                        <thead>
                            <tr>
                                <th>表名</th>
                                <th>注释</th>
                                <th>引擎</th>
                                <th>排序规则</th>
                                <th>记录数</th>
                                <th>表大小</th>
                                <th>创建时间</th>
                                <th>更新时间</th>

                                <th>操作</th>
                        </thead>
                        <tbody>
                            {foreach name="data" id="item"}
                            <tr>
                                <td>{$item.name}</td>
                                <td>{$item.comment}</td>
                                <td>{$item.engine}</td>
                                <td>{$item.collation}</td>
                                <td>{$item.rows}</td>
                                <td>{$item.data_length|format_size}</td>
                                <td>{$item.create_time}</td>
                                <td>{$item.update_time}</td>

                                <td class="td-do">

                                    <button data-data='{"name":"{$item.name}"}' data-url="{:url('view')}" data-confirm="2"
                                        data-type="2" class="AjaxButton layui-btn layui-btn-xs layui-bg-gray"
                                        data-title="{$item.name}({$item.comment})表详情" title="查看表详情"
                                        data-toggle="tooltip">
                                        <i class="fa  fa-info-circle"></i>
                                    </button>

                                    <button data-data='{"name":"{$item.name}"}' data-go="1" data-url="{:url('optimize')}"
                                        data-confirm="2" class="AjaxButton layui-btn layui-btn-xs layui-bg-orange" title="优化表"
                                        data-toggle="tooltip">
                                        <i class="fa  fa-refresh"></i>
                                    </button>

                                    <button  data-data='{"name":"{$item.name}"}' data-go="1" data-url="{:url('repair')} "
                                        data-confirm="2" class="AjaxButton layui-bg-blue layui-btn layui-btn-xs" title="修复表"
                                        data-toggle="tooltip">
                                        <i class="fa  fa-circle-o-notch"></i>
                                    </button>


                                </td>
                            </tr>
                            {/foreach}
                        </tbody>
                    </table>

                </div>

            </div>
        </div>
    </div>
    {/block}